home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / ACORNUSERS / CBSA / ART / INTERGIF / !InterGif / !Help < prev    next >
Text File  |  1999-02-19  |  19KB  |  446 lines

  1.  
  2.                     InterGif 6.07
  3.                     =============
  4.  
  5.         by Peter Hartley (K) All Rites Reversed
  6.     Desktop front-end adapted from one by Iain Logan
  7.  
  8. INTERGIF 6.07 is a program for making GIF images from 2-, 4-, 16-
  9. or 256-colour RiscOS sprite files, or from Draw files, or from
  10. files produced with Iota Software's (commercial) animation
  11. program The Complete Animator. It can also convert from GIFs back
  12. to sprites, and can also be used as an optimiser for animated
  13. GIFs prepared in other programs.
  14.  
  15.  
  16.         Get the latest version
  17.         ----------------------
  18.  
  19. The latest version of InterGif, plus more help information and
  20. full source code for various platforms, is always available on
  21. the World-Wide Web at the NEW address
  22.         http://utter.chaos.org.uk/~pdh/software/intergif.htm
  23. It's the nineteenth of February, 1999, as I'm writing these
  24. words: if it's long after that that you're reading them, you
  25. might want to see if there's a later version now available.
  26.  
  27.  
  28.         Distribution
  29.         ------------
  30.  
  31. InterGif is NOT COPYRIGHTED and is NOT distributed under the GNU
  32. General Public Licence. For full information read the file
  33. !InterGif.Copying or go to the Web site.
  34.     InterGif is mine: in particular, it doesn't belong to my
  35. employers, ANT Limited. If it gets anything wrong, it's my
  36. problem, not theirs.
  37.     Versions 6 and later of InterGif contain (a small piece of)
  38. code developed by the Independent JPEG Group. (The "Find best
  39. palette" routine, if you must know.)
  40.     In order to convert Draw files you will need Acorn's Drawfile
  41. module. This is not included in InterGif distributions, but is
  42. available from
  43.         ftp://ftp.acorn.co.uk/
  44.  
  45.  
  46.         Features
  47.         --------
  48.  
  49.   o InterGif runs either on the desktop, or from the command line
  50.     (so I can produce the GIFs for my own Web pages, from the
  51.     sprites which constitute their source, using a make file!).
  52.  
  53.   o InterGif has options for the transparency and interleaving
  54.     features of GIF89a.
  55.  
  56.   o InterGif can take a sprite file (or an Animator file)
  57.     containing several frames, and produce from it an animated
  58.     GIF which Netscape 2.0 or later, MSIE 3.0beta1 or later, or
  59.     ANT Fresco 1.22 or later will render as animated if it's
  60.     inlined in a Web page. The animation delay can be set
  61.     individually for each frame, or for the whole animation.
  62.  
  63.   o InterGif will reduce its input to a smaller number of colours
  64.     (unless you explicitly tell it not to) if it can get away
  65.     with it, i.e. if only that many of the colours are used
  66.     anyway.
  67.  
  68.   o It will also compress only the rectangle which has changed on
  69.     each frame, so if your animation has a complex but stationary
  70.     background, the background will only get compressed once.
  71.     Deviousness and cunning are employed to minimise the final
  72.     size of the GIF: so much so that many animated GIFs I've
  73.     found on the Web have ended up smaller when run through
  74.     InterGif.
  75.  
  76.   o It can also make GIF images from Draw files. It uses, for
  77.     this, the same code that is in my AADraw program (see end),
  78.     which means it produces GIFs or sprites with a 216-colour
  79.     cube palette (as used on Macintoshes and by Netscape and MSIE
  80.     for Windows), *not* the standard Acorn 256-colour palette.
  81.     (For AADraw connoisseurs, I'll add that you don't get the -b
  82.     feature of that program: InterGif always anti-aliases to
  83.     white.)
  84.  
  85.   o InterGif 6 lets you forcibly reduce a GIF's palette to the
  86.     standard Acorn 256-colour palette, or to a 216-entry colour
  87.     cube (as used on the Macintosh and by most Windows browsers),
  88.     or to a palette file you supply. Alternatively, it can
  89.     calculate the best palette for displaying the GIF, and then
  90.     reduce to that. (This is not the same as the colour reduction
  91.     InterGif has always had: it is lossy and you should keep
  92.     copies of your unmapped originals.)
  93.  
  94.   o InterGif 6.03 and later can pre-process each of your images
  95.     using Acorn's ChangeFSI: see below for more details.
  96.  
  97.  
  98.         Changes since 6.06
  99.         ------------------
  100.  
  101.   o Small bugfix for 1x1 images
  102.  
  103.   o Fix for platforms (eg Win32) where char is signed by default
  104.  
  105.   o Win32 and Linux versions now accept sprites
  106.  
  107.  
  108.         Desktop use
  109.         -----------
  110.  
  111. Pretty straightforward. Run !InterGif; drag your sprite file,
  112. Animator file, Draw file, or GIF onto the left-hand bit of the
  113. window; set any options you want in the middle bit of the window;
  114. and save your GIF or sprite file out from the right-hand bit of
  115. the window. The options are:
  116.  
  117.   o Interlaced
  118.         Produce an interlaced GIF: in other words, one which a Web
  119.     browser can render quickly at a low resolution, filling in the
  120.     details later as they arrive.
  121.  
  122.   o Looping animation
  123.         Normally an animated GIF plays through once and stops. If
  124.     you tick this option, you'll get an animated GIF that plays
  125.     over and over again. This is a Netscape extension to the GIF
  126.     format, but hopefully it will become a popular one -- both
  127.     MSIE and Fresco now support it too.
  128.  
  129.   o Join input files
  130.         This option causes InterGif to look for only one frame in
  131.     the file you give it, and then look for the next frame in
  132.     another file with the numeric part of the file incremented.
  133.     For instance, you could have three files called frame000,
  134.     frame001, and frame002 and create an three-frame animation by
  135.     dragging frame000 (only) onto the InterGif window and
  136.     choosing "Join input files".
  137.  
  138.   o Set delay
  139.         This lets you set the frame rate, in centiseconds. This
  140.     overrides any frame rate specified in the input file.
  141.         If this is *not* ticked, InterGif's output uses the
  142.     same frame rate as its input. You can change frame delays
  143.     individually in Animator files in the usual way (in Animator,
  144.     press F7) or in sprite files by giving the frames sprite
  145.     names with "delay" in them: for instance, a sprite called
  146.     "037delay25" will be given a delay of 25 centiseconds.
  147.     (Anything before the word "delay" is ignored.)
  148.         If you leave "Set delay" unticked, and the input file
  149.     doesn't specify frame delays, a default of 8 centiseconds per
  150.     frame (12.5 frames per second) is used.
  151.         Note that you can't have different delays for different
  152.     frames if you tick "Set delay"; if you want that, you have to
  153.     set it up in your sprite or Animator file.
  154.  
  155.   o Transparency
  156.         Choose None to get a wholly opaque GIF (no masking), Auto
  157.     to get InterGif to use the sprites' masks (or the film's
  158.     background colour); or you can specify a transparent
  159.     pixel-value directly.
  160.         (Hint: to find out what pixel-value a sprite pixel has,
  161.     load the sprite into Paint, ensure its palette window is
  162.     showing, click Menu over the pixel you want, and choose
  163.     "Paint->Select colour".)
  164.  
  165.   o Trim
  166.         This option causes InterGif to remove wholly transparent
  167.     rows and columns from the edges of the image. This means that
  168.     the output image may be a different size from the input one,
  169.     which is otherwise never the case.
  170.         This option ticks itself automatically if you're making a
  171.     transparent, interlaced GIF: for the reason why, see the
  172.     section "Netscape Communicator" below.
  173.         You probably want to tick this if you're converting a
  174.     Draw file, as these often end up with one or two transparent
  175.     rows and columns at the edges.
  176.  
  177.   o Split output
  178.         This splits up the input file into one output file per
  179.     frame. Not, I admit, terribly useful, unless you need to
  180.     import something into an application that expects lots of
  181.     one-frame GIFs -- for instance, Sun's Java Animator applet.
  182.     The names of the files are taken from the one you give, with
  183.     any numeric part incremented as needed, so if you save a
  184.     three-frame animation as frame001/gif, you also get
  185.     frame002/gif and frame003/gif.
  186.  
  187.   o Web site
  188.         Clicking on this button takes you to my Web pages on
  189.     chaos, as described above. For this to work, you need to be
  190.     connected to the Internet, and also have a Web browser loaded
  191.     which understands ANT's URL broadcast message -- for example,
  192.     Fresco or ArcWeb. (Probably the others too, these days.)
  193.  
  194.   o Palette...
  195.         This icon opens the Palette Options window, giving you
  196.     the following further options:
  197.  
  198.       o Use existing
  199.             This does the same as previous versions of InterGif:
  200.         it discards palette entries that aren't actually used,
  201.         but keeps all the others.
  202.  
  203.       o Acorn standard 256
  204.       o 216 cube
  205.             These map all colours in the input onto the nearest
  206.         ones in either the standard Acorn 256-colour "mode 15"
  207.         palette, or the Macintosh/PC standard 216-entry colour
  208.         cube. This is useful, for instance, for reducing the size
  209.         of 256-greyscale images.
  210.  
  211.       o From file
  212.             You can also map colours to those in any Acorn
  213.         palette file (such as one saved from !Paint).
  214.  
  215.       o Find best
  216.             This is the most powerful option: selecting this
  217.         makes InterGif calculate the optimal palette for
  218.         displaying the input images, and then map to that. You
  219.         can tell it to calculate any size palette from 2 to 256
  220.         entries. InterGif uses the "median cut" algorithm to
  221.         calculate the palette.
  222.  
  223.   o ChangeFSI...
  224.         This icon opens the InterGif calling ChangeFSI window,
  225.     which gives you the option of pre-processing InterGif's input
  226.     file with Acorn's ChangeFSI image manipulation
  227.     program. This is mainly useful for importing files in formats
  228.     which InterGif doesn't understand directly: for instance, the
  229.     "Targa" files output by POV-Ray for Windows.
  230.         InterGif can give ChangeFSI any of a large range of
  231.     command-line options: most of the time you probably want this
  232.     set to just
  233.             28
  234.      -- which tells ChangeFSI to convert things to 256-colour
  235.     sprites. For details of the other options you can apply, see
  236.     the "FSIuse" text file inside the !ChangeFSI directory.
  237.         If the icons in this window are greyed out, this means
  238.     <ChangeFSI$Dir> isn't set: you should make sure !ChangeFSI
  239.     has been seen by the filer. If you don't have ChangeFSI at
  240.     all, or if you've got a version older than 1.12, you can get
  241.     1.12 from Acorn's FTP site at ftp://ftp.acorn.com/ .
  242.         There's a whole section on ChangeFSI later on in this
  243.     Help file.
  244.  
  245.  
  246.         Command-line use
  247.         ----------------
  248.  
  249. The !Boot file of !InterGif sets up Alias$intergif, so you no
  250. longer need to copy the intergif file into your library
  251. directory.
  252.     At its simplest, you can just type intergif and the name of
  253. your sprite or film file, and it'll be converted. Here's a full
  254. list of the options:
  255.  
  256. intergif [-i] [-loop] [-s ] [-split] [-d cs] [-t [pixel]] [-trim] [-join]
  257.          [-216 | -256 | -pal palfile | -best n ] [-c cfsi-options]
  258.          [-o outfile] infile
  259.  
  260.     -i
  261.         Produce an interlaced GIF
  262.     -loop
  263.         Looping animation
  264.     -s
  265.         Produce a sprite rather than a GIF
  266.     -join
  267.         Join several input files
  268.     -split
  269.         One frame per file
  270.     -d cs
  271.         Frame delay in centiseconds
  272.     -t
  273.         Use automatic transparency (default is no transparency)
  274.     -t pixel
  275.         Use specified pixel as transparent
  276.     -trim
  277.         Remove any transparent border
  278.     -216
  279.         Map to Macintosh/PC colour-cube palette
  280.     -256
  281.         Map to Acorn mode 15 palette
  282.     -pal palfile
  283.         Map to given palette
  284.     -best n
  285.         Find best n-colour palette and map to that (2<=n<=256)
  286.     -o outfile
  287.         Filename for the output (default is <infile>/gif)
  288.     -c cfsi-options
  289.         Preprocess using ChangeFSI with the given options (see below)
  290.     infile
  291.         A RiscOS sprite, Draw, Complete Animator or GIF file
  292.  
  293.  
  294.         Size is important
  295.         -----------------
  296.  
  297. Since at least version 2.02, InterGif has optimised out any
  298. wholly transparent rows and columns at the edges of the first (or
  299. only) frame of transparent GIFs. It does this by setting the size
  300. in the Logical Screen Descriptor to the size of the whole GIF,
  301. and the size in the first Frame Descriptor to the smaller
  302. rectangle which bounds the first frame. This is all completely as
  303. per GIF spec, and is what happens for the second and subsequent
  304. frames of animated GIFs anyway.
  305.     However, some programs which read GIFs (usually those which
  306. either don't understand animations, or don't understand
  307. transparency) incorrectly ignore the LSD size and use the FD
  308. size. These programs include ChangeFSI, Claris HomePage, and
  309. early versions of Fresco (before 1.60). This is a problem as it
  310. can lead to Web authors specifying the wrong WIDTH= and HEIGHT=
  311. attributes in Web pages. All versions of Netscape and MSIE use
  312. the LSD size (at least for GIF89's).
  313.     Early versions of the program "Creator" only set the FD size
  314. and not the LSD size; such images look wrong in MSIE. Netscape
  315. cheats! and uses only the FD size for GIF87 images and
  316. (correctly) the LSD size for GIF89 images. As of version 1.63,
  317. this is Fresco's behaviour too.
  318.  
  319.  
  320.         Netscape Communicator
  321.         ---------------------
  322.  
  323. Some interlaced transparent GIFs made with version 6.01 or
  324. earlier of InterGif may look wrong in Netscape Communicator
  325. (Netscape 4): any that do, should be reconverted with version
  326. 6.02 or later. You may wish to use the new -trim option; if not,
  327. your GIF will be compressed slightly less well than it could be.
  328. This is due to a bug in Netscape 4, not in InterGif. For grody
  329. technical details, read on.
  330.     Netscape 4, in both the Windows and Solaris versions, gets it
  331. wrong if an interlaced image has a border optimised out on the
  332. first frame (in the manner described in "Size is important"
  333. above). The symptom is that black, non-transparent lines appear
  334. every fourth pixel down "transparent" areas of the image. This is
  335. *unquestionably* a bug in Communicator rather than InterGif
  336. (especially in view of the fact that Netscape 3.02 gets it
  337. right), but, powerless as I am in the face of Netscape
  338. Corporation, I've stopped InterGif from optimising out the border
  339. if an interlaced GIF is being made.
  340.     This means that such GIFs end up being compressed less
  341. optimally than they might. If this is a problem (and it may not
  342. be, as interlaced GIFs usually end up compressed less well than
  343. non-interlaced ones anyway) you can use the new -trim option to
  344. *remove*, rather than just avoid compressing, the transparent
  345. border. When using -trim, InterGif's output will *not* be the
  346. same size in pixels as the input image (it is in all other
  347. cases). You can use the HSPACE= and VSPACE= attributes of the
  348. HTML <IMG> tag to produce a transparent border around a trimmed
  349. image.
  350.  
  351.  
  352.         Using ChangeFSI with InterGif
  353.         -----------------------------
  354.  
  355. Some very powerful results are possible using this option. You
  356. need to read the help file "FSIuse" inside the !ChangeFSI
  357. directory, to know what to put in the InterGif's ChangeFSI
  358. Options icon (or pass with the -c command-line option).
  359.  
  360.   * Versions of ChangeFSI
  361.  
  362. There are several different versions of ChangeFSI circulating.
  363. The one available on Acorn's FTP site is, at time of writing,
  364. version 1.12, but there are later versions: I think these were
  365. distributed with RiscOS 3.6 and 3.7. The version I've got calls
  366. itself 1.13S, and I can't remember where I got it.
  367.     The only problem that older versions cause to InterGif, is
  368. that some early versions set ChangeFSI$Dir in their !Run files
  369. but not in their !Boot files, so InterGif won't know where to
  370. find the ChangeFSI program until ChangeFSI has already been run
  371. once. Version 1.12 fixes this.
  372.     In some versions of ChangeFSI, the FSIuse help file mentioned
  373. above is in !ChangeFSI.Documents rather than !ChangeFSI itself.
  374.  
  375.   * ChangeFSI only knows about single-frame files
  376.  
  377. This means that if you wish to run ChangeFSI on an animation file
  378. -- if, for instance, you've got an animated GIF you want to
  379. reduce in size -- you have to use InterGif twice.
  380.     The first time, you need to have the "Split output files" or
  381. -split option set: InterGif will produce a whole series of
  382. one-frame sprite files.
  383.     You then need to feed these sprite files back into InterGif,
  384. this time with Join input files or -join selected (plus your
  385. ChangeFSI options to reduce size or whatever): this will produce
  386. the reduced-size animation file you wanted.
  387.  
  388.   * ChangeFSI doesn't know about masking or transparency
  389.  
  390. ChangeFSI treats all input files as having a completely solid
  391. mask (no transparency). There isn't really a good workaround for
  392. this, as ChangeFSI can't know what background colour to fade
  393. "half-lit" edge pixels against.
  394.     All you can really do is edit your animation afterwards, in
  395. Paint or The Complete Animator, to re-supply the transparency by
  396. hand.
  397.  
  398.   * Example ChangeFSI settings
  399.  
  400. If all you're doing is using ChangeFSI to cope with an input
  401. format that InterGif doesn't understand itself, you just need to
  402. click on the ChangeFSI... button to open the "InterGif calling
  403. ChangeFSI" window, tick the tickbox, and enter
  404.         28
  405. in the Options icon. The "28" tells ChangeFSI to convert things
  406. to 256-colour sprites. The command-line equivalent would be
  407. something like
  408.         intergif in/bmp -o out/gif -c "28"
  409.  
  410. To reduce the input file to half-size, enter
  411.         28 1:2 1:2
  412. or use a command like
  413.         intergif in -o out -c "28 1:2 1:2"
  414.  
  415. If you've got a "deep" (16bpp or 24bpp) input image, you can use
  416. ChangeFSI to convert it to a deep sprite, and then tell InterGif
  417. to choose the optimal 256-colour palette, by entering
  418.         S32,90,90
  419. and then choosing Find best in the "InterGif palette options"
  420. window; or, from the command line,
  421.         intergif in -o out -c "S32,90,90" -best 256
  422. Older versions of ChangeFSI won't understand the S32,90,90 option
  423. though, and you may get an error.
  424.  
  425. My favourite one is converting a whole directory of output files
  426. from POV-Ray for Windows (in 24bpp Targa format) into a
  427. reduced-size animated GIF in one operation:
  428.         intergif frame000/tga -o anim/gif -join -c "28 1:3 1:3"
  429.  
  430.  
  431.         See also
  432.         --------
  433.  
  434.     The InterGif page
  435.         http://utter.chaos.org.uk/~pdh/software/intergif.htm
  436.     The AADraw page
  437.         http://utter.chaos.org.uk/~pdh/software/aadraw.htm
  438.     The Complete Animator
  439.         http://www.iota.co.uk/animator/
  440.     GIF89a specification
  441.         http://asterix.seas.upenn.edu/~mayer/lzw_gif/gif89a.html
  442.  
  443.  
  444.                                                  pdh@chaos.org.uk
  445.                                               19th February, 1998
  446.